﻿using System.Linq;

namespace BruceCore.Entity.Repositorys
{
    public interface ISysRoleRepository : IRepository<SysRole>
    {

    }
    public class SysRoleRepository : Repository<SysRole>, ISysRoleRepository
    {
        private readonly BruceContext _dbContext;
        public SysRoleRepository(BruceContext dbContext) : base(dbContext)
        {
            _dbContext = dbContext;
        }

        public override SysRole GetById(string id)
        {
            return _dbContext.SysRole.FirstOrDefault(r => r.ID == id);
        }
    }
}
